package gui;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.Dimension;
import java.awt.FlowLayout;

import javax.swing.ImageIcon;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.BoxLayout;
import java.awt.Font;
import javax.swing.JTextArea;
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;
import javax.swing.border.LineBorder;
import java.awt.Color;


public class VnVideo extends JPanel {
	private JPanel acciones;
	protected GridBagLayout gridBagLayout;
	protected JButton btnAnterior;
	protected JButton btnSiguiente;
	private JLabel lblTtulo;
	private JButton button;
	private JTextArea txtrDescripcin;
	
	/**
	 * Create the panel.
	 */
	public VnVideo() {
		setAutoscrolls(true);
		gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[]{620, 21, 0, 0, 0};
		gridBagLayout.rowHeights = new int[]{0, 0, 390, 0, 0, 0, 0, 0, 0, 0};
		gridBagLayout.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		gridBagLayout.rowWeights = new double[]{0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
		setLayout(gridBagLayout);
		
		lblTtulo = new JLabel("T\u00EDtulo");
		GridBagConstraints gbc_lblTtulo = new GridBagConstraints();
		gbc_lblTtulo.anchor = GridBagConstraints.WEST;
		gbc_lblTtulo.insets = new Insets(0, 0, 5, 5);
		gbc_lblTtulo.gridx = 0;
		gbc_lblTtulo.gridy = 0;
		add(lblTtulo, gbc_lblTtulo);
		lblTtulo.setFont(new Font("Tahoma", Font.BOLD, 18));
		
		button = new JButton("Autor");
		GridBagConstraints gbc_button = new GridBagConstraints();
		gbc_button.anchor = GridBagConstraints.WEST;
		gbc_button.insets = new Insets(0, 0, 5, 5);
		gbc_button.gridx = 0;
		gbc_button.gridy = 1;
		add(button, gbc_button);
		
		VReproductor reproductor = new VReproductor(null);
		GridBagConstraints gbc_reproductor = new GridBagConstraints();
		gbc_reproductor.gridwidth = 2;
		gbc_reproductor.fill = GridBagConstraints.BOTH;
		gbc_reproductor.insets = new Insets(0, 0, 5, 5);
		gbc_reproductor.gridx = 0;
		gbc_reproductor.gridy = 2;
		add(reproductor, gbc_reproductor);
		
		VnVideosRel vnVideosRel = new VnVideosRel();
		GridBagConstraints gbc_vnVideosRel = new GridBagConstraints();
		gbc_vnVideosRel.gridheight = 7;
		gbc_vnVideosRel.insets = new Insets(0, 0, 0, 5);
		gbc_vnVideosRel.fill = GridBagConstraints.BOTH;
		gbc_vnVideosRel.gridx = 2;
		gbc_vnVideosRel.gridy = 2;
		add(vnVideosRel, gbc_vnVideosRel);
		
		VListasRel listasRel = new VListasRel();
		GridBagConstraints gbc_listasRel = new GridBagConstraints();
		gbc_listasRel.gridheight = 7;
		gbc_listasRel.fill = GridBagConstraints.BOTH;
		gbc_listasRel.gridx = 3;
		gbc_listasRel.gridy = 2;
		add(listasRel, gbc_listasRel);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setVisible(false);
		scrollPane.setBorder(null);
		scrollPane.setPreferredSize(new Dimension(640, 115));
		scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
		GridBagConstraints gbc_scrollPane = new GridBagConstraints();
		gbc_scrollPane.fill = GridBagConstraints.BOTH;
		gbc_scrollPane.insets = new Insets(0, 0, 5, 5);
		gbc_scrollPane.gridx = 0;
		gbc_scrollPane.gridy = 3;
		add(scrollPane, gbc_scrollPane);
		
		VnVideosRelLista vnVideosRelLista = new VnVideosRelLista();
		scrollPane.setViewportView(vnVideosRelLista);
		scrollPane.updateUI();
		
		txtrDescripcin = new JTextArea();
		txtrDescripcin.setText("Descripci\u00F3n:\r\nSOY UNA DESCRIPCI\u00D3N DE UN V\u00CDDEO");
		GridBagConstraints gbc_txtrDescripcin = new GridBagConstraints();
		gbc_txtrDescripcin.insets = new Insets(0, 0, 5, 5);
		gbc_txtrDescripcin.fill = GridBagConstraints.BOTH;
		gbc_txtrDescripcin.gridx = 0;
		gbc_txtrDescripcin.gridy = 4;
		add(txtrDescripcin, gbc_txtrDescripcin);
		
		acciones = new JPanel();
		GridBagConstraints gbc_acciones = new GridBagConstraints();
		gbc_acciones.insets = new Insets(0, 0, 5, 5);
		gbc_acciones.fill = GridBagConstraints.BOTH;
		gbc_acciones.gridx = 0;
		gbc_acciones.gridy = 5;
		add(acciones, gbc_acciones);
		
		btnAnterior = new JButton(new ImageIcon(VnVideoAdmin.class.getResource("/img/anterior.png")));
		btnAnterior.setBorder(null);
		btnAnterior.setVisible(false);
		acciones.add(btnAnterior);
		
		btnSiguiente = new JButton(new ImageIcon(VnVideoAdmin.class.getResource("/img/siguiente.png")));
		btnSiguiente.setBorder(null);
		btnSiguiente.setVisible(false);
		acciones.add(btnSiguiente);
		
		VComentarios comentarios = new VComentarios();
		GridBagConstraints gbc_comentarios = new GridBagConstraints();
		gbc_comentarios.insets = new Insets(0, 0, 0, 5);
		gbc_comentarios.fill = GridBagConstraints.BOTH;
		gbc_comentarios.gridx = 0;
		gbc_comentarios.gridy = 8;
		add(comentarios, gbc_comentarios);
		

	}

	public JPanel getAcciones() {
		return acciones;
	}
}
